/**
 * User: zeng/704729872@qq.com
 * Date: 2018/4/20
 * Time: 13:29
 */
import * as crud from './crud';

const api = {
  crud
};

const install = function(Vue) {
  if (install.installed) return;
  install.installed = true;

  // 定义属性到Vue原型中
  Object.defineProperties(Vue.prototype, {
    $api: {
      get() {
        return api;
      }
    }
  });
};

export default {
  install
};
